/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fichiersimulation;

/**
 *
 * @author Antoine
 */
public class TrajetVO implements Comparable<TrajetVO> {
    
    private Integer heure;
    private Integer minute;
    private Integer seconde;
    
    private Integer etageDepart;
    private Integer etageArrivee;
    private Integer nbPersonnes;

    public TrajetVO(Integer heure, Integer minute, Integer seconde, Integer etageDepart, Integer etageArrivee, Integer nbPersonnes) {
        this.heure = heure;
        this.minute = minute;
        this.seconde = seconde;
        this.etageDepart = etageDepart;
        this.etageArrivee = etageArrivee;
        this.nbPersonnes = nbPersonnes;
    }
    
    public Integer getHeure() {
        return heure;
    }

    public Integer getMinute() {
        return minute;
    }

    public Integer getSeconde() {
        return seconde;
    }

    public Integer getEtageDepart() {
        return etageDepart;
    }

    public Integer getEtageArrivee() {
        return etageArrivee;
    }

    public Integer getNbPersonnes() {
        return nbPersonnes;
    }

    public void setHeure(Integer heure) {
        this.heure = heure;
    }

    public void setMinute(Integer minute) {
        this.minute = minute;
    }

    public void setSeconde(Integer seconde) {
        this.seconde = seconde;
    }

    public void setEtageDepart(Integer etageDepart) {
        this.etageDepart = etageDepart;
    }

    public void setEtageArrivee(Integer etageArrivee) {
        this.etageArrivee = etageArrivee;
    }

    public void setNbPersonnes(Integer nbPersonnes) {
        this.nbPersonnes = nbPersonnes;
    }

    @Override
    public String toString() {
        return "TrajetVO{" + "heure=" + heure + ", minute=" + minute + ", seconde=" + seconde + ", etageDepart=" + etageDepart + ", etageArrivee=" + etageArrivee + ", nbPersonnes=" + nbPersonnes + '}';
    }

    @Override
    public int compareTo(TrajetVO t) {
        if(this.heure.compareTo(t.heure) > 0){
            return 1;
        } else if(this.heure.compareTo(t.heure) < 0) {
            return -1;
        }
        if(this.minute.compareTo(t.minute) > 0){
            return 1;
        } else if(this.minute.compareTo(t.minute) < 0) {
            return -1;
        }
        if(this.seconde.compareTo(t.seconde) > 0){
            return 1;
        } else if(this.seconde.compareTo(t.seconde) < 0) {
            return -1;
        }
        return 0;
    }
    
    
}
